#define _CRT_SECURE_NO_WARNINGS 1


#include<vector>
#include<iostream>

using namespace std;

bool Func(int n, vector<int>& v)
{
	while (n)
	{
		v.push_back(n % 10);
		n /= 10;
	}

	return v.size() % 2 == 0;
}

int countSymmetricIntegers(int low, int high)
{
	int count = 0;

	for (int i = low; i <= high; i++)
	{
		vector<int> v;

		if (Func(i, v))
		{
			int sum1 = 0, sum2 = 0;

			for (int j = 0; j < v.size() / 2; j++)
			{
				sum1 += v[j];
			}

			for (int j = v.size() / 2; j < v.size(); j++)
			{
				sum2 += v[j];
			}

			if (sum1 == sum2)
			{
				count++;
			}
		}
	}

	return count;
}

//int main()
//{
//	cout << countSymmetricIntegers(1200, 1230) << endl;
//
//	return 0;
//}